package com.project.demo.game;

import com.project.demo.model.User;

import java.sql.PseudoColumnUsage;
import java.util.UUID;

/**
 * Created with IntelliJ IDEA.
 * Description:一个游戏房间
 * User:DELL
 * Time:19:23
 */
public class Room {
    private String roomId;
    private User user1;
    private User user2;

    public String getRoomId() {
        return roomId;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    public User getUser1() {
        return user1;
    }

    public void setUser1(User user1) {
        this.user1 = user1;
    }

    public User getUser2() {
        return user2;
    }

    public void setUser2(User user2) {
        this.user2 = user2;
    }

    public Room(){
        //生成唯一的房间id
        roomId = UUID.randomUUID().toString();
    }

    public static void main(String[] args) {
        Room room = new Room();
        System.out.println(room.roomId);
    }
}
